<?php
add_action( 'init', 'M_director' );
function M_director() {
	$labels = array(
				'name' => __( 'M_director' ),
				'singular_name' => __( 'director' ),
				'add_new' => _x('Add New', 'director'),
				'add_new_item' => __('Add New '),
				'edit_item' => __('Edit director'),
				'new_item' => __('New director'),
				'view_item' => __('View director'),
				'search_items' => __('Search director')
			);
   $args = array(
			'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'has_archive' => true,
    		'hierarchical' => false,
    		'taxonomies' => array('director'),
    		'supports' => array( 'title', 'editor', 'author',  'comments', 'custom-fields', 'cats')
		);
	register_post_type( 'director',$args);    
}

function director_taxonomy ()
{
    $labels = array(
		'name'              => _x( 'director', 'taxonomy general name' ),
		'singular_name'     => _x( 'director ', 'taxonomy singular name' ),
		'search_items'      => __( 'Search director Categories' ),
		'all_items'         => __( 'All director Categories' ),
		'parent_item'       => __( 'Parent director Category' ),
		'parent_item_colon' => __( 'Parent director Category:' ),
		'edit_item'         => __( 'Edit director Category' ),
		'update_item'       => __( 'Update director Category' ),
		'add_new_item'      => __( 'Add New director Category' ),
		'new_item_name'     => __( 'New director Category' ),
		'menu_name'         => __( 'director' ),
	);
    $args = array(
		'labels' => $labels,
		'hierarchical' 	=> true,
		'public'		=> true,
		'query_var'		=> 'director',
		'rewrite'		=>  array('slug' => 'director' ),
		'_builtin'		=> false,
	);
    register_taxonomy('director', 'director', $args);
}
add_action( 'init', 'director_taxonomy', 0 );
